{% from 'partials/_defaults.html' import OPEN_GRAPH_IMAGE with context %}
{% from 'partials/_defaults.html' import USE_OPEN_GRAPH with context %}
{% from 'partials/_defaults.html' import share_title with context %}
{% from 'partials/_defaults.html' import share_url with context %}
{% from 'partials/_defaults.html' import obj with context %}
{% if USE_OPEN_GRAPH %}
    <meta property="og:site_name" content="{{ SITENAME|striptags|escape }}">
    <meta property="og:type" content="article">
    {% if obj is defined %}
        <meta property="og:title"
              content="{{ obj.title|striptags|escape }}">
        <meta property="og:url"
              content="{{ SITEURL }}/{{ obj.url }}">
        <meta property="og:description"
              content="{{ obj.summary|striptags|escape }}">
        {% if obj.og_image %}
            <meta property="og:image"
                  content="{{ SITEURL }}/{{ obj.og_image }}">
        {% elif OPEN_GRAPH_IMAGE %}
            <meta property="og:image"
                  content="{{ SITEURL }}/{{ OPEN_GRAPH_IMAGE }}">
        {% endif %}
    {% else %}
        <meta property="og:title"
              content="{{ SITENAME|striptags|escape }}">
        <meta property="og:url" content="{{ SITEURL }}/{{ output_file }}">
        {% if OPEN_GRAPH_IMAGE %}
            <meta property="og:image"
                  content="{{ SITEURL }}/{{ OPEN_GRAPH_IMAGE }}">
        {% endif %}
    {% endif %}
{% endif %}
